<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>归还图书</title>
<link rel="stylesheet" href="../../static/css/return.css">
<link rel="stylesheet" href="../../static/css/xcConfirm.css">
<script type="text/javascript" src="../../static/js/jquery-1.9.1.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/xcConfirm3.js" charset="utf-8"></script>
</head>
<body>
<div style="width: 100%;height: 100%;">
			<div class="div1" th:each="r:${books}">
				<img th:src="@{../book/download(id=${r.book.id})}" style="height: 100%;width: 33%;"/>
				<div class="div2">
					<div>
						<p class="bookname" style="" th:text="${r.book.name}">java从入门到精通</p>
						<span class="bookuser">作者：<font class="book" th:text="${r.book.author}"></font></span>
						<span>出版社：<font class="book" th:text="${r.book.press}">某某某出版社</font></span>
					</div>
					
					<div class="hi" onclick="huanshu(this.id,this.title)" th:id="${r.id}"  th:title="${r.book.name}">
						<font style="color: #FFFFFF;">归还图书</font>
					</div>
				</div>
			</div>
		</div>
</body>
<script type="text/javascript">
		function huanshu(value,name){
			$.post('../../CheckCode', function(data){
	    		if(data){
	    			
	    			var txt=  "您现在确定要归还图书《"+name+"》么？<br>图书君提示您：尽快联系图书管理员确认";
					window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm,undefined,value);
	    		}else{
	    			var txt=  "请先登录";
					window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.confirm);
	    		}
	    	});
		}
	</script>
</html>